package com.ctsi.ntedu.repository;

import com.ctsi.ntedu.domain.NteduTel;
import com.ctsi.ntedu.domain.NteduTelExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

/**
 * @author ctsi-biyi-generator
*/
@Mapper
public interface NteduTelRepository extends com.ctsi.ssdc.repository.BaseRepository<NteduTel, Integer, NteduTelExample> {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @SelectProvider(type=NteduTelSqlProvider.class, method="countByExample")
    long countByExample(NteduTelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @DeleteProvider(type=NteduTelSqlProvider.class, method="deleteByExample")
    int deleteByExample(NteduTelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @Delete({
        "delete from ntedu_tel",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @Insert({
        "insert into ntedu_tel (id, tel, ",
        "school_id)",
        "values (#{id,jdbcType=INTEGER}, #{tel,jdbcType=VARCHAR}, ",
        "#{schoolId,jdbcType=INTEGER})"
    })
    int insert(NteduTel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @InsertProvider(type=NteduTelSqlProvider.class, method="insertSelective")
    int insertSelective(NteduTel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @SelectProvider(type=NteduTelSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="school_id", property="schoolId", jdbcType=JdbcType.INTEGER)
    })
    List<NteduTel> selectByExample(NteduTelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @Select({
        "select",
        "id, tel, school_id",
        "from ntedu_tel",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="school_id", property="schoolId", jdbcType=JdbcType.INTEGER)
    })
    NteduTel selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @UpdateProvider(type=NteduTelSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") NteduTel record, @Param("example") NteduTelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @UpdateProvider(type=NteduTelSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") NteduTel record, @Param("example") NteduTelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @UpdateProvider(type=NteduTelSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(NteduTel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_tel
     *
     * @mbg.generated Fri Aug 06 10:05:23 CST 2021
     */
    @Update({
        "update ntedu_tel",
        "set tel = #{tel,jdbcType=VARCHAR},",
          "school_id = #{schoolId,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(NteduTel record);
}